<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/jquery-3.3.1.min.js"></script>
    <script>
        function doSomething(){
            // console.log($('#hello').attr('title'))
            // $('#hello').attr('title', '这是一个div')

            // console.log($('#username').val())
            // $('#username').val('张三')

            // console.log($('#all').prop('checked'))
            // $('#all').prop('checked', true)

            // console.log($('#hello').text())
            // $('#hello').text('哈哈哈哈')

            // $('#myul').append($('<li>').text('lucy'))
            
            $('#myul').empty()
        }
    </script>
</head>
<body>
    <button onclick="doSomething()">按钮1</button>
    <hr>

    <div id="hello" title="this is a div">我的div</div>
    用户名：<input type="text" id="username"> <br>
    全选： <input type="radio" id="all">

    <ul id="myul">
        <li>tom</li>
        <li>jack</li>
        <li>alice</li>
        <li>mike</li>
    </ul>
</body>
</html>